#include <iostream>
#include"List.hpp"
using namespace std;

void test_bitlist1()
{
	wu::list<int> lt1;
	lt1.push_back(1);
	lt1.push_back(2);
	lt1.push_back(3);
	lt1.push_back(4);

	wu::list<int>::iterator it1 = lt1.begin();
	while (it1 != lt1.end())
	{
		*it1 += 1;
		cout << *it1 << " ";
		++it1;
	}
	cout << endl;
}

void test_bitlist3()
{
	wu::list<int> lt1;
	lt1.push_back(1);
	lt1.push_back(2);
	lt1.push_back(3);
	lt1.push_back(4);

	for (auto e : lt1)
	{
		cout << e << " ";
	}
	cout << endl;

	lt1.push_front(5);
	lt1.push_front(6);

	for (auto e : lt1)
	{
		cout << e << " ";
	}
	cout << endl;

	lt1.pop_back();
	lt1.pop_back();
	lt1.pop_front();
	lt1.pop_front();

	for (auto e : lt1)
	{
		cout << e << " ";
	}
	cout << endl;

	lt1.pop_back();
	lt1.pop_back();
	//lt1.pop_back();

	for (auto e : lt1)
	{
		cout << e << " ";
	}
	cout << endl;
}

int main()
{
	//test_list7();
	//test_op2();

	test_bitlist3();

	//cout << typeid(vector<int>::iterator).name() << endl;

	return 0;
}